package com.scalar.chiptrack.sales.actions.quote;

import com.scalar.chiptrack.ChipTracActionCommand;
import com.scalar.chiptrack.utils.ISubAction;

/**
 * User: ganesh
 * Date: May 14, 2008
 * Time: 1:39:17 PM
 */
public class PreviousQuotationsDetailsSearchCommandFactory
{
    private static PreviousQuotationsDetailsSearchCommandFactory commandFactory;
    private PreviousQuotationsDetailsSearchCommandFactory()
    {
    }
    public static synchronized PreviousQuotationsDetailsSearchCommandFactory getInstance()
    {
       if(commandFactory == null)
       {
           commandFactory = new PreviousQuotationsDetailsSearchCommandFactory();
       }
       return commandFactory;
    }
    public ChipTracActionCommand getActionCommand(String action)
    {
        ChipTracActionCommand actionCommand=null;
        if(action.equalsIgnoreCase(ISubAction.CHIPTRAC_PREVIOUS_QUOTATIONS_DETAILS_SEARCH))
        {
           actionCommand=new PreviousQuotationsDetailsSearchActionCommand();
        }
        else if(action.equalsIgnoreCase(ISubAction.CHIPTRAC_PREVIOUS_QUOTATION_DETAILS_SEARCH_SORT))
        {
           actionCommand=new PreviousQuotationsDetailsSearchSortCommand();
        }
        else if(action.equalsIgnoreCase(ISubAction.CHIPTRAC_PREVIOUS_QUOTATION_DETAILS_SEARCH_SCROLL))
        {
           actionCommand=new PreviousQuotationsDetailsSearchScrollCommand();
        }
        return actionCommand;
    }
}
